063db21895b80ec74a67e59d88829a0e67ced3d5
[project/luci.git] /
1 /* Licensed to the public under the Apache License 2.0. */
2
3 'use strict';
4
5 return L.Class.extend({
6 title: _('Ping'),
7
8 rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
9 var ping = {
10 title: "%H: ICMP Round Trip Time",
11 vlabel: "ms",
12 number_format: "%5.1lf ms",
13 data: {
14 sources: {
15 ping: [ "value" ]
16 },
17 options: {
18 ping__value: {
19 noarea: true,
20 overlay: true,
21 title: "%di"
22 }
23 }
24 }
25 };
26
27 var droprate = {
28 title: "%H: ICMP Drop Rate",
29 vlabel: "%",
30 number_format: "%5.2lf %%",
31 data: {
32 types: [ "ping_droprate" ],
33 options: {
34 ping_droprate: {
35 noarea: true,
36 overlay: true,
37 title: "%di",
38 transform_rpn: "100,*"
39 }
40 }
41 }
42 };
43
44 var stddev = {
45 title: "%H: ICMP Standard Deviation",
46 vlabel: "ms",
47 number_format: "%5.1lf ms",
48 data: {
49 types: [ "ping_stddev" ],
50 options: {
51 ping_stddev: {
52 noarea: true,
53 overlay: true,
54 title: "%di"
55 }
56 }
57 }
58 };
59
60 return [ ping, droprate, stddev ];
61 }
62 });